import React, { Component, PureComponent, PropTypes } from 'react'

// main for left and right layout at single row
// like at row e.g.
//
/* left-text          right-text */
//
export default class SingleLine extends PureComponent {
  render() {
    const { left, right, className } = this.props
    return (
      <div className={`cm-single-line-box ${className}`}>
        <span>{left}</span>
        {right}
      </div>
    )
  }
}

SingleLine.defaultProps = {
  className: '',
}

SingleLine.propTypes = {
  left: PropTypes.string.isRequired,
  right: PropTypes.node.isRequired,
  className: PropTypes.string,
}